package io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;

public class PWDemo {
    public static void main(String[] args) throws FileNotFoundException {
        //向pw.txt写入文本数据
        PrintWriter pw = new PrintWriter("./pw.txt");
        //    写入方法1:
        //    File file = new File("pw.txt");
        //    PrintWriter pw = new PrintWriter(file);

//    方式二：
        pw.println("熊大");
        pw.println("熊二");
        System.out.println("写出完毕");
        pw.close();
    }
}
